package net.cn_su.sharpeyes.components;

import android.content.Context;
import android.widget.RelativeLayout;
import android.widget.TextView;

import net.cn_su.sharpeyes.R;
import net.cn_su.sharpeyes.utils.TimerUtil;

import org.androidannotations.annotations.EViewGroup;
import org.androidannotations.annotations.ViewById;

import java.util.Calendar;

/**
 * 查看回放页面中，快速回放的时间选择对象
 * Created by Overlord on 2016/08/18.
 * Singularity Universe
 */
@EViewGroup(R.layout.item_list_playback_time)
public class PlaybackTimeItem extends RelativeLayout {

    @ViewById
    protected TextView textView_date, textView_time;

    public PlaybackTimeItem(Context context) {
        super(context);
    }

    public void bindData(Calendar calendar){
        textView_date.setText(TimerUtil.getTime_mmdd(calendar));
        textView_time.setText(TimerUtil.getTime_hhmm(calendar));
    }
}
